/**
 * 
 */
package user_client;

import java.sql.Connection;

/**
 * 
 * @author Pawel Rychly
 *
 */
public abstract class DataBaseClient {
	
	/**
	 * Represents connection to database
	 */
	private Connection connection;
	private String password = null;
	private String userName = null;
	
	public DataBaseClient(Connection connection, String userName, String password) {
		this.connection = connection;
		this.userName = userName;
		this.password = password;
	}
	
	//returns informations about user credibility
	private boolean checkUserCredibility(){
		//TODO: definition of this function 
		return true;
	}
	
	/**
	 * Function finds a book in database;
	 */
	public void searchBook(){
		//TODO: definition of this function
	}
	
	/**
	 * Function returns a Connection object.
	 * @return
	 */
	public Connection getConnection() {
		return connection;
	}
	
	/**
	 * Returns a password of this client.
	 * @return password.
	 */
	public String getPassword() {
		return password;
	}
	
	/**
	 * Returns name of this client.
	 * @return name.
	 */
	public String getUserName() {
		return userName;
	}
	
	
}
